package com.servlet;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class MapDemo {
    private static Map<String,String> map = new HashMap<>();

    public static Map<String,String> getMap() throws IOException {
        List<String> list = FileUtils.readLines(new File("/Users/edy/Desktop/file/身份证所在地.txt"), "UTF-8");
        for (String s : list) {
            String[] split = s.split(",");
            map.put(split[0],split[1]);
        }
        return map;
    }

}
